/* 页面容器 */
.cmd-web1-container {
  min-height: 100vh;
  background-color: #111827;
  color: #f3f4f6;
  display: flex;
  flex-direction: column;
}

/* 头部导航 */
.cmd-web1-header {
  background-color: #1f2937;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.header-content {
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-logo-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  color: #ef4444;
  font-size: 1.5rem;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.nav-menu {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: #f87171;
}

/* 主要内容区 */
.main-content {
  flex-grow: 1;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* 关卡信息 */
.level-info {
  background-color: #1f2937;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 2rem;
  transform: translate(0, 0);
  transition: all 0.15s ease;
}

.level-info:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.level-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.level-icon-container {
  width: 2.5rem;
  height: 2.5rem;
  background-color: #dc2626;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
}

.level-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.level-description {
  color: #d1d5db;
  margin-bottom: 1rem;
}

.level-objective {
  background-color: #374151;
  padding: 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

.objective-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* 靶场模拟区域 */
.simulation-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .simulation-container {
    grid-template-columns: 2fr 1fr;
  }
}

/* 攻击区域 */
.attack-area {
  background-color: #1f2937;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  height: 100%;
}

.attack-header {
  background-color: #374151;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #4b5563;
}

.attack-title {
  font-weight: 700;
  display: flex;
  align-items: center;
}

.attack-icon {
  color: #4ade80;
  margin-right: 0.5rem;
}

.attack-content {
  padding: 1.5rem;
}

.attack-description {
  color: #d1d5db;
  margin-bottom: 1rem;
}

/* 表单 */
.attack-form {
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .form-group {
    flex-direction: row;
    gap: 0.75rem;
  }
}

.form-input {
  flex-grow: 1;
  background-color: #374151;
  border: 1px solid #4b5563;
  border-radius: 0.375rem;
  padding: 0.5rem 1rem;
  transition: all 0.15s ease;
}

.form-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.5);
}

.submit-button {
  background-color: #dc2626;
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 0.375rem;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
}

.submit-button:hover {
  background-color: #b91c1c;
}

.button-icon {
  margin-right: 0.5rem;
}

/* 执行结果 */
.result-container {
  background-color: #111827;
  border-radius: 0.375rem;
  padding: 1rem;
  height: 16rem;
  overflow-y: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.result-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.loading-spinner {
  animation: spin 1s linear infinite;
  border-radius: 9999px;
  height: 2rem;
  width: 2rem;
  border: 2px solid #f87171;
  border-bottom-color: transparent;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.result-output {
  white-space: pre;
}

.result-empty {
  color: #6b7280;
  font-style: italic;
}

/* 右侧提示和信息 */
.info-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* 提示卡片 */
.hint-card {
  background-color: #1f2937;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
}

.hint-title {
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
}

.hint-icon {
  color: #fbbf24;
  margin-right: 0.5rem;
}

.hint-list {
  color: #d1d5db;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.hint-item {
  display: flex;
  align-items: flex-start;
}

.hint-item-icon {
  color: #f87171;
  margin-top: 0.25rem;
  margin-right: 0.5rem;
}

/* 状态卡片 */
.status-card {
  background-color: #1f2937;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
}

.status-title {
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
}

.status-icon {
  color: #4ade80;
  margin-right: 0.5rem;
}

.status-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-label {
  color: #d1d5db;
}

.status-indicator {
  color: #6b7280;
}

.status-indicator.completed {
  color: #10b981;
}

.solution-toggle {
  margin-top: 1rem;
  color: #93c5fd;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: 0.875rem;
}

.solution-toggle:hover {
  color: #bfdbfe;
}

.toggle-icon {
  margin-right: 0.25rem;
}

/* 解决方案 */
.solution-container {
  margin-top: 1rem;
  background-color: #374151;
  padding: 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

.solution-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #fbbf24;
}

.solution-steps {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: #d1d5db;
  padding-left: 1.5rem;
  list-style-type: decimal;
}

.solution-step {
  font-size: 0.875rem;
}

.solution-code {
  background-color: #4b5563;
  padding: 0.25rem;
  border-radius: 0.25rem;
}

.solution-flag {
  color: #4ade80;
}

/* 页脚 */
.cmd-web1-footer {
  background-color: #1f2937;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  border-top: 1px solid #374151;
}

.footer-content {
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  text-align: center;
}

.footer-text {
  color: #9ca3af;
  font-size: 0.875rem;
}

.footer-subtext {
  color: #9ca3af;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* 滚动条样式 */
.result-container::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.result-container::-webkit-scrollbar-track {
  background: #374151;
  border-radius: 4px;
}

.result-container::-webkit-scrollbar-thumb {
  background: #6b7280;
  border-radius: 4px;
}

.result-container::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* 输出行样式 */
.output-command {
  color: #93c5fd;
}

.output-error {
  color: #f87171;
}

.output-flag {
  color: #4ade80;
  font-weight: 700;
}

/* 成功提示信息 */
.success-message {
  background-color: #065f46;
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  margin-bottom: 1.5rem;
  border: 2px solid #10b981;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.success-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.success-icon {
  font-size: 3rem;
  color: #10b981;
}

.success-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #f0fdf4;
}

.success-text {
  color: #d1fae5;
  font-size: 1rem;
}

.flag-display {
  background-color: #064e3b;
  padding: 1rem;
  border-radius: 0.5rem;
  margin: 1rem 0;
  border: 1px solid #10b981;
}

.flag-text {
  font-family: 'Courier New', Courier, monospace;
  color: #10b981;
  font-weight: bold;
  font-size: 1.1rem;
  word-break: break-all;
}

.reset-button {
  background-color: #3b82f6;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.2s;
}

.reset-button:hover {
  background-color: #2563eb;
}

/* 发现阶段提示 */
.discovery-phase {
  background-color: #374151;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-top: 1rem;
  border-left: 4px solid #fbbf24;
}

.phase-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.phase-title {
  font-size: 1.25rem;
  font-weight: bold;
  color: #fbbf24;
  margin: 0;
}

.phase-text {
  color: #d1d5db;
  margin: 0;
}

.phase-button {
  background-color: #fbbf24;
  color: #111827;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  font-weight: bold;
  align-self: flex-start;
  transition: background-color 0.2s;
}

.phase-button:hover {
  background-color: #f59e0b;
}

/* 攻击阶段指示器 */
.attack-stage {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 0.5rem;
}

.stage-item {
  flex: 1;
  text-align: center;
  padding: 0.5rem;
  border-radius: 0.25rem;
  background-color: #374151;
  color: #9ca3af;
}

.stage-item.active {
  background-color: #dc2626;
  color: white;
  font-weight: bold;
}

.stage-item.completed {
  background-color: #16a34a;
  color: white;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .success-message {
    padding: 1rem;
  }
  
  .success-title {
    font-size: 1.25rem;
  }
  
  .flag-text {
    font-size: 0.9rem;
  }
}
